package com.examination.system.administrator.dao;

import com.examination.system.administration.CollegeMajorClassification;
import com.examination.system.administration.ext.CollegeMajorClassificationNode;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Repository;

import java.util.Collection;
import java.util.List;


/**
 * @author 寇淇芮
 * @Date 2019/8/20 15:55
 */
@Mapper
@Repository
public interface CqeecExaminationSystemMapper {
    /**
     * 根据id删除数据 并返回删除的条数
     * @param id
     * @return
     */
    @Delete("DELETE  FROM  college_major_classification WHERE  id = #{id} ")
    Integer deleteById(@Param("id") String id);

    /**
     * 根据id和name查询数据
     * @param id
     * @param name
     * @return
     */
    @Select("SELECT * FROM college_major_classification WHERE plate = #{id} and name=#{name}")
    List<CollegeMajorClassification> findByName(@Param("id") String id,
                                                @Param("name") String name);
}
